/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.employee.entity;

import org.hibernate.validator.constraints.Length;
import com.thinkgem.jeesite.modules.sys.entity.Office;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.thinkgem.jeesite.common.persistence.DataEntity;
import com.thinkgem.jeesite.common.utils.excel.annotation.ExcelField;

/**
 * 考勤结果统计Entity
 * @author pan.zhou
 * @version 2017-07-21
 */
public class AttendanceRecords extends DataEntity<AttendanceRecords> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 员工名称
	private String employeenumber;		// 员工编号
	private Office office;		// 仓库
	private Office company;		// 国家
	private String orgUnit;		// 组织单元
	private String shiftId;     //班次表id
	private String shiftName;     //班次名称
	private String position;		// 职位
	private Date attendanceDate;		// 考勤日期
	private String workHour;		// 出勤工时
	private String holidayHour;		// 假期时间
	private String resetHour;      //休息时长
	private String isLate;		// 是否迟到（是：Y否：N）
	private String isEarlyLeave;		// 是否早退（是：Y否：N）
	private String isException;		// 是否打卡异常（是：Y否：N）
	private String isAbsent;		// 是否矿工（是：Y否：N）
	private Date   startTime;      //考勤开始时期
	private Date   endTime;        //考勤结束时间
	private String companyName;
	private String officeName;

	public AttendanceRecords() {
		super();
	}

	public AttendanceRecords(String id){
		super(id);
	}

	public AttendanceRecords(String employeeNumer, Date today, String deFalg) {
		this.employeenumber = employeeNumer;
		this.attendanceDate = today;
		this.delFlag = deFalg;
		this.startTime = today;
		this.endTime =today;
	}

    @Length(min=1, max=100, message="员工名称长度必须介于 1 和 100 之间")
    @ExcelField(title="员工姓名", type=0, align=2, sort=20)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=1, max=100, message="员工编号长度必须介于 1 和 100 之间")
	@ExcelField(title="员工编号", type=0, align=2, sort=10)
	public String getEmployeenumber() {
		return employeenumber;
	}

	public void setEmployeenumber(String employeenumber) {
		this.employeenumber = employeenumber;
	}
	
	public Office getOffice() {
		return office;
	}

	public void setOffice(Office office) {
		this.office = office;
	}
	

	
	@Length(min=0, max=64, message="组织单元长度必须介于 0 和 64 之间")
    public String getOrgUnit() {
        return orgUnit;
    }

    
    
    public Office getCompany() {
        return company;
    }

    
    public void setCompany(Office company) {
        this.company = company;
    }

    public void setOrgUnit(String orgUnit) {
        this.orgUnit = orgUnit;
    }

    @Length(min=0, max=64, message="职位长度必须介于 0 和 64 之间")
    @ExcelField(title="职位", type=0, align=2, sort=50)
	public String getPosition() {
		return position;
	}

	public void setPosition(String position) {
		this.position = position;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="考勤日期", type=0, align=2, sort=70)
	public Date getAttendanceDate() {
		return attendanceDate;
	}

	public void setAttendanceDate(Date attendanceDate) {
		this.attendanceDate = attendanceDate;
	}
	
	@Length(min=0, max=11, message="出勤工时长度必须介于 0 和 11 之间")
	@ExcelField(title="出勤工时", type=0, align=2, sort=80)
	public String getWorkHour() {
		return workHour;
	}

	public void setWorkHour(String workHour) {
		this.workHour = workHour;
	}
	
	@Length(min=0, max=11, message="假期时间长度必须介于 0 和 11 之间")
	@ExcelField(title="休假工时", type=0, align=2, sort=90)
	public String getHolidayHour() {
		return holidayHour;
	}

	public void setHolidayHour(String holidayHour) {
		this.holidayHour = holidayHour;
	}
	
	@Length(min=0, max=1, message="是否迟到（是：Y否：N）长度必须介于 0 和 1 之间")
	@ExcelField(title="迟到", type=0, align=2, sort=100)
	public String getIsLate() {
		return isLate;
	}

	public void setIsLate(String isLate) {
		this.isLate = isLate;
	}
	
	@Length(min=0, max=1, message="是否早退（是：Y否：N）长度必须介于 0 和 1 之间")
	@ExcelField(title="早退", type=0, align=2, sort=110)
	public String getIsEarlyLeave() {
		return isEarlyLeave;
	}

	public void setIsEarlyLeave(String isEarlyLeave) {
		this.isEarlyLeave = isEarlyLeave;
	}
	
	@Length(min=0, max=1, message="是否打卡异常（是：Y否：N）长度必须介于 0 和 1 之间")
	@ExcelField(title="打卡异常", type=0, align=2, sort=120)
	public String getIsException() {
		return isException;
	}

	public void setIsException(String isException) {
		this.isException = isException;
	}
	
	@Length(min=0, max=1, message="是否矿工（是：Y否：N）长度必须介于 0 和 1 之间")
	@ExcelField(title="旷工", type=0, align=2, sort=130)
	public String getIsAbsent() {
		return isAbsent;
	}

	public void setIsAbsent(String isAbsent) {
		this.isAbsent = isAbsent;
	}

    public String getResetHour() {
        return resetHour;
    }

    public void setResetHour(String resetHour) {
        this.resetHour = resetHour;
    }

    public String getShiftId() {
        return shiftId;
    }

    public void setShiftId(String shiftId) {
        this.shiftId = shiftId;
    }
    @ExcelField(title="班次", type=0, align=2, sort=60)
    public String getShiftName() {
		return shiftName;
	}

	public void setShiftName(String shiftName) {
		this.shiftName = shiftName;
	}

    
    public Date getStartTime() {
        return startTime;
    }

    
    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    
    public Date getEndTime() {
        return endTime;
    }

    
    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }
	
    @ExcelField(title="国家", type=0, align=2, sort=30)
    public String getCompanyName() {
        return company.getName();
    }


    @ExcelField(title="仓库", type=0, align=2, sort=40)
    public String getOfficeName() {
        return office.getName();
    }


	

}